package com.ftg.learn.bus.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ftg.learn.bus.VO.BusRegVo;
import com.ftg.learn.bus.VO.FundsStatisticsVo;
import com.ftg.learn.bus.mapper.StatisticsFundsMapper;
import com.ftg.learn.bus.service.IStatisticsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author :[魏英豪]
 * @className :[StatisticsServiceImpl]
 * @createTime :[2022/3/26 15:54]
 */
@Service
public class StatisticsServiceImpl extends ServiceImpl<StatisticsFundsMapper, FundsStatisticsVo> implements IStatisticsService {
    @Resource
    StatisticsFundsMapper fundmapper;

    /**
     * 经费支出统计分页
     * @param pagination
     * @return
     */
    public List<FundsStatisticsVo> showAllFunds(Page<FundsStatisticsVo> pagination){
        return fundmapper.showAllFunds(pagination);
    }

    /**
     * 经费支出统计模糊查询
     * @param pagination
     * @param name
     * @return
     */
    public List<FundsStatisticsVo> showAllFundsByName(Page<FundsStatisticsVo> pagination,String name){
        return fundmapper.showAllFundsByName(pagination,name);
    }

    /**
     * 公车使用信息统计模糊查询
     * @param pagination
     * @param name
     * @return
     */
    public List<BusRegVo> showAllRegByName(Page<BusRegVo> pagination,String name){
        return fundmapper.showAllRegByName(pagination,name);
    }

    /**
     * 公车信息统计分页
     * @param pagination
     * @return
     */
    public List<BusRegVo> showAllReg(Page<BusRegVo> pagination){
        return fundmapper.showAllReg(pagination);
    }
}
